<?php
namespace app\api\controller;
use think\Controller;
use think\Db;
class My extends Base{
	//公告
	public function comad(){
        $list=Db::name('setup')->where(array('id'=>1))->find();
        if($list){
            return json(['code' => 200, 'msg' => '查询成功' ,'data' =>$list['comad']]);
        }else{
            return json(['code' => 500, 'msg' => '查询失败', 'data' =>$list]);
        }
	}
	//公告
	public function server(){
        $list=Db::name('server')->select();
        if($list){
            return json(['code' => 200, 'msg' => '查询成功', 'data' =>$list]);
        }else{
            return json(['code' => 500, 'msg' => '查询失败']);
        }
	}
	//帮助中心
	public function help(){
        $list=Db::name('help')->where(array('status'=>1))->order('id desc')->select();
        if($list){
            return json(['code' => 200, 'msg' => '查询成功' ,'data' =>$list]);
        }else{
            return json(['code' => 500, 'msg' => '查询失败', 'data' =>$list]);
        }
	}
}